ds_list_find_index

语法:

ds_list_find_index(id, val);


参数 描述
id The id of the list to use.
val 待检索的值


返回: Real(实数)


描述

With this function you can check the given list for a value and the position within the list for that value will be returned. Note that if there are more than one entries in the list with the same value, the position of any one of them may be returned, and that if the value does not exist, then -1 will be returned. Note that the value can be an array, which you can check with the function is_array.


例如:

pos = ds_list_find_index(list, "Player1");

The above code checks the list indexed in the variable "list" for the value "Player1" and stores the returned position in the variable "pos".


上一页: DS Lists
下一页: ds_list_find_value
© Copyright YoYo Games Ltd. 2018 All Rights Reserved